#include <gtk/gtk.h>
#include <libnemo-private/nemo-file.h>
#include <libnemo-extension/nemo-file-info.h>

int 
main (int argc, char* argv[])
{
    gtk_init (&argc, &argv);

    NemoFile *file;
    NemoFileInfo *info, *parent_info;
    file = nemo_file_get_by_uri ("file:///usr/share/icons");

    info = NEMO_FILE_INFO (file);
    parent_info = nemo_file_info_get_parent_info (info);

    GFile *location, *parent_location;
    location = nemo_file_info_get_location (info);
    parent_location = nemo_file_info_get_parent_location (info);

    g_print ("location uri:%s\n", g_file_get_uri (location));
    g_print ("file uri:%s\n", nemo_file_info_get_uri (info));

    g_print ("\nfile type:%d\n", nemo_file_info_get_file_type (info));
    g_print ("file name:%s\n", nemo_file_info_get_name (info));
    g_print ("activation uri:%s\n", nemo_file_info_get_activation_uri (info));
    g_print ("file uri scheme:%s\n", nemo_file_info_get_uri_scheme (info));
    g_print ("file mime type:%s\n", nemo_file_info_get_mime_type (info));
    g_print ("name attribute:%s\n", nemo_file_info_get_string_attribute (info, "name"));

    g_print ("\nparent location uri:%s\n", g_file_get_uri (parent_location));
    g_print ("parent uri:%s\n", nemo_file_info_get_parent_uri (info));

    g_print ("\nparent_info: name:%s\n", nemo_file_info_get_name (parent_info));

    g_print ("\ncreate fileinfo\n");
    info = nemo_file_info_create_for_uri ("network:///");
    g_print ("file uri:%s\n", nemo_file_info_get_uri (info));

    g_print ("\nlookup fileinfo\n");
    info = nemo_file_info_lookup_for_uri ("file:///usr/share/icons");
    g_print ("file uri:%s\n", nemo_file_info_get_uri (info));

    nemo_file_unref (file);

    return 0;
}
